package com.firstsight.micro.homedo.mq;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * Created on 2021/6/2.
 *
 * @author yanshuchun
 */
@Component
@RocketMQMessageListener(topic = "${rocketmq.producer.topic}",consumerGroup = "${rocketmq.producer.group}")
public class RocketMQConsumer implements RocketMQListener<String> {
    @Override
    public void onMessage(String s) {
        System.out.println(s);
    }
}
